﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SFTJBaseOnProvider.aspx.cs" Inherits="WXYW.SFTJBaseOnProvider" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    神州数码客服中心代理商收费清单统计
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <table width="100%">
        <tr>
            <td style="width:30%">
                <table style="border-collapse:collapse;border-color:Gray; line-height:25px" >
                    <tr>
                        <td><b>总计</b></td>
                        <td><asp:DropDownList ID="totalYearDropDownList" runat="server" AutoPostBack="True" 
                                onselectedindexchanged="totalYearDropDownList_SelectedIndexChanged">
                            </asp:DropDownList>年</td>
                    </tr>                    
                    <tr>
                        <td colspan="2" class="tableList">
                            <asp:Repeater ID="providerRepeater" runat="server">
                                <HeaderTemplate>
                                    <table width="100%">
                                        <tr>
                                            <th>
                                                代理商
                                            </th>
                                            <th>
                                                总计金额
                                            </th>
                                        </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr style="height: 25px;">
                                        <td>
                                            <%#Eval("Provider")%>
                                        </td>
                                        <td>
                                            <%#Eval("InAll")%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>                     
                                    <tr style="color:Red">
                                        <td>
                                            <b>合计</b>
                                        </td>          
                                        <%=TotalString %>                  
                                     </tr>
                                    </table>
                                </FooterTemplate>
                            </asp:Repeater>
                        </td>
                    </tr>
                </table>
            </td>
            <td valign="top" style="width:70%" align="center">
                <table style="border-collapse:collapse;border-color:Gray; line-height:25px" width="100%">
                    <tr>
                          <td colspan="5" style="border-bottom-style: solid; border-bottom-width: 1px;">
                              <b>分类查询</b>
                          </td>
                    </tr>
                    <tr>
                        <td>
                            代理商
                        </td>
                        <td>
                            <asp:DropDownList ID="serviceStationDropDownList" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td>
                            起始年
                            <asp:DropDownList ID="yearDropDownList" runat="server">
                            </asp:DropDownList>
                            月<asp:DropDownList ID="monthDropDownList" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td>
                            终止年<asp:DropDownList ID="tyearDropDownList" runat="server">
                            </asp:DropDownList>
                            月<asp:DropDownList ID="tmonthDropDownList" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:Button ID="searchButton" runat="server" Text="查询" OnClick="searchButton_Click" />
                        </td>
                    </tr>
                    <tr style="height:25px">
                        <td colspan="5" style="color:Red">
                            神码数码客服中心<asp:Label ID="serviceLabel" runat="server" Text=""></asp:Label><asp:Label
                                ID="yearLabel" runat="server" Text=""></asp:Label>年<asp:Label ID="monthLabel" runat="server"
                                    Text=""></asp:Label>月到<asp:Label ID="tyearLabel" runat="server" Text=""></asp:Label>年<asp:Label
                                        ID="tmonthLabel" runat="server" Text=""></asp:Label>月 维修收费清单
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5">
                            <asp:GridView ID="productGridView" runat="server" Width="100%" EmptyDataText="没有您要的记录"
                                AutoGenerateColumns="false" CssClass="tableList">
                                <Columns>
                                    <asp:TemplateField HeaderText="RMA#">
                                        <ItemTemplate>
                                            <%#Eval("ApplicationForm.ApplicationCode") %>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="产品型号">
                                        <ItemTemplate>
                                            <%#Eval("ProductType.ProductTypeName")%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="维修部件" DataField="RepairAccessory" />
                                    <asp:BoundField HeaderText="收费金额" DataField="Cost" />
                                    <asp:BoundField HeaderText="收费原因" DataField="ReasonOfCost" />
                                    <asp:TemplateField HeaderText="查看详情">
                                        <ItemTemplate>
                                            <img src="image/operateicon/docview.gif" />
                                            <asp:LinkButton ID="viewLinkButton" runat="server" OnClick="viewLinkButton_Click"
                                                CommandArgument='<%#Eval("ApplicationProductID") %>'>查看</asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            <table>
                                <tr>
                                    <td>
                                        <b>总计</b>
                                    </td>
                                    <td style="color:Red">
                                        ￥<asp:Label ID="totalLabel" runat="server" Text="0"></asp:Label>元
                                    </td>
                                    <td>
                                        <b>本月小计</b>
                                    </td>
                                    <td style="color:Red">
                                        ￥<asp:Label ID="resultLabel" runat="server" Text="0"></asp:Label>元
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    
    <asp:HiddenField ID="hfProductID" runat="server" />
    <%--for maintain record--%>
    <cc1:ModalPopupExtender ID="maintainRecordModalPopupExtender" runat="server" PopupControlID="maintainPanel"
        BackgroundCssClass="modalBackground" TargetControlID="hiddenTargetControlForModalPopup" CancelControlID="LinkButton1">
    </cc1:ModalPopupExtender>
    <asp:Panel ID="maintainPanel" Style="display: none" BackImageUrl="~/image/mainSkinBG.gif"
        CssClass="modalPopup" runat="server" Width="700px">
        <!-- Header -->
        <div class="box-header" id="dragBar">
            <img src="image/stdBox_left_top.gif" alt="" />
            <h2>
                维修记录</h2>
        </div>
        <div class="functionPanel">
            <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                <ContentTemplate>
                    <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0">
                        <cc1:TabPanel ID="tabPanel1" runat="server">
                            <HeaderTemplate>
                                基本信息
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table width="100%">
                                    <tr style="height: 25px">
                                        <td style="width: 10%">
                                            RMA#:
                                        </td>
                                        <td style="width: 25%; border-bottom-style: solid; border-bottom-width: 1px;">
                                            <asp:Label ID="rmaMaintainLabel" runat="server" Text=""></asp:Label>
                                        </td>
                                        <td style="width: 12%">
                                            产品类型:
                                        </td>
                                        <td style="width: 25%; border-bottom-style: solid; border-bottom-width: 1px;">
                                            <asp:Label ID="typeLabel" runat="server" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr style="height: 25px">
                                        <td>
                                            序列号:
                                        </td>
                                        <td style="border-bottom-style: solid; border-bottom-width: 1px;">
                                            <asp:Label ID="serialLabel" runat="server" Text=""></asp:Label>
                                        </td>
                                        <td>
                                            版本号:
                                        </td>
                                        <td style="border-bottom-style: solid; border-bottom-width: 1px;">
                                            <asp:Label ID="versionNOLbl" runat="server" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr style="height: 25px">
                                        <td>
                                            购买日期：
                                        </td>
                                        <td style="border-bottom-style: solid; border-bottom-width: 1px;">
                                            <asp:Label ID="purchaseTimeLbl" runat="server" Text=""></asp:Label>
                                        </td>
                                        <td>
                                            维修完成日期：
                                        </td>
                                        <td style="border-bottom-style: solid; border-bottom-width: 1px;">
                                            <asp:Label ID="wxwcrqLabel" runat="server" Text="Label"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel ID="tabPanel2" runat="server">
                            <HeaderTemplate>
                                不良现象
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:TextBox ID="blxxTextBox" runat="server" ReadOnly="true"
                                            Width="90%" TextMode="MultiLine" Rows="5"></asp:TextBox>
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel ID="tabPanel3" runat="server">
                            <HeaderTemplate>
                                不良原因
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:RadioButtonList ID="blyyRadioButtonList1" RepeatDirection="Horizontal" runat="server"
                                    Enabled="false">
                                    <asp:ListItem Text="T05" Value="T05"></asp:ListItem>
                                    <asp:ListItem Text="P08" Value="P08"></asp:ListItem>
                                    <asp:ListItem Text="C12" Value="C12"></asp:ListItem>
                                    <asp:ListItem Text="F/W" Value="F/W"></asp:ListItem>
                                </asp:RadioButtonList>
                                <asp:RadioButtonList ID="blyyRadioButtonList2" RepeatDirection="Horizontal" runat="server"
                                    Enabled="false">
                                    <asp:ListItem Text="T05" Value="T05"></asp:ListItem>
                                    <asp:ListItem Text="P08" Value="P08"></asp:ListItem>
                                    <asp:ListItem Text="C12" Value="C12"></asp:ListItem>
                                    <asp:ListItem Text="F/W" Value="F/W"></asp:ListItem>
                                </asp:RadioButtonList>
                                <asp:RadioButtonList ID="blyyRadioButtonList3" RepeatDirection="Horizontal" runat="server"
                                    Enabled="false">
                                    <asp:ListItem Text="T05" Value="T05"></asp:ListItem>
                                    <asp:ListItem Text="P08" Value="P08"></asp:ListItem>
                                    <asp:ListItem Text="C12" Value="C12"></asp:ListItem>
                                    <asp:ListItem Text="F/W" Value="F/W"></asp:ListItem>
                                </asp:RadioButtonList>
                                <asp:RadioButtonList ID="blyyRadioButtonList4" RepeatDirection="Horizontal" runat="server"
                                    Enabled="false">
                                    <asp:ListItem Text="T05" Value="T05"></asp:ListItem>
                                    <asp:ListItem Text="P08" Value="P08"></asp:ListItem>
                                    <asp:ListItem Text="C12" Value="C12"></asp:ListItem>
                                    <asp:ListItem Text="F/W" Value="F/W"></asp:ListItem>
                                </asp:RadioButtonList>
                                <asp:RadioButtonList ID="blyyRadioButtonList5" RepeatDirection="Horizontal" runat="server"
                                    Enabled="false">
                                    <asp:ListItem Text="T05" Value="T05"></asp:ListItem>
                                    <asp:ListItem Text="P08" Value="P08"></asp:ListItem>
                                    <asp:ListItem Text="C12" Value="C12"></asp:ListItem>
                                    <asp:ListItem Text="F/W" Value="F/W"></asp:ListItem>
                                </asp:RadioButtonList>
                                T05：Retest ok P08：Power Ng C12：Chipset Ng F/W：软件
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel ID="tabPanel4" runat="server">
                            <HeaderTemplate>
                                不良零件
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table width="60%">
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="blljTextBox1" runat="server" Width="60%" ReadOnly="true"></asp:TextBox><br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="blljTextBox2" runat="server" Width="60%" ReadOnly="true"></asp:TextBox><br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="blljTextBox3" runat="server" Width="60%" ReadOnly="true"></asp:TextBox><br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="blljTextBox4" runat="server" Width="60%" ReadOnly="true"></asp:TextBox><br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="blljTextBox5" runat="server" Width="60%" ReadOnly="true"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel ID="tabPanel5" runat="server">
                            <HeaderTemplate>
                                零件位置
                            </HeaderTemplate>
                            <ContentTemplate>
                                <span style="color: Red">提示：同一个器件维修了多个位置时，器件位置中间请用半角“，”隔开</span>
                                <table width="60%">
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="ljwzTextBox1" runat="server" Width="60%" ReadOnly="true"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="ljwzTextBox2" runat="server" Width="60%" ReadOnly="true"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="ljwzTextBox3" runat="server" Width="60%" ReadOnly="true"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="ljwzTextBox4" runat="server" Width="60%" ReadOnly="true"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                             <asp:TextBox ID="ljwzTextBox5" runat="server" Width="60%" ReadOnly="true"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel ID="tabPanel6" runat="server">
                            <HeaderTemplate>
                                整机替换
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:RadioButton ID="ghRadioButton" AutoPostBack="true" runat="server"
                                    Text="更换" GroupName="replace" Enabled="false" />
                                <asp:RadioButton ID="thRadioButton" runat="server" Text="替换S/N" GroupName="replace" Enabled="false" />
                                <asp:RadioButton ID="noRadioButton" runat="server" Text="无" Checked="true" GroupName="replace" Enabled="false" />
                                <asp:TextBox ID="thSerialNumberTextBox" runat="server" ReadOnly="true"></asp:TextBox><br />
                                替换型号:<asp:TextBox ID="thProductTypeTextBox" AutoPostBack="true"
                                    runat="server"></asp:TextBox>替换版本:<asp:DropDownList ID="versionDDL" runat="server" Enabled="false">
                                    </asp:DropDownList>
                                <div style="font-size: small; color: Blue">
                                    替换是指同一型号替换为不同设备包括序列号也被替换<br />
                                    更换是指同一型号更换为不同的主板序列号不变<br />
                                </div>
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel ID="TabPanel7" runat="server">
                            <HeaderTemplate>
                                故障分析
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table border="0" width="90%">
                                    <tr>
                                        <td style="color: Blue">
                                            A:芯片故障
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton2" runat="server" GroupName="a" Text="正常损坏" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton3" runat="server" GroupName="a" Text="使用不当" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton1" runat="server" GroupName="a" Text="有缺陷" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton4" runat="server" GroupName="a" Text="非人为(不可抗力等)" Enabled="false"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="color: Blue">
                                            B:电源故障
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton7" runat="server" GroupName="b" Text="正常损坏" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton6" runat="server" GroupName="b" Text="操作不当" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton12" runat="server" GroupName="b" Text="有缺陷" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton5" runat="server" GroupName="b" Text="环境不适" Enabled="false"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="color: Blue">
                                            C:升级F/W
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton9" runat="server" GroupName="c" Text="正常升级" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton13" runat="server" GroupName="c" Text="使用不当" Enabled="false" />
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton8" runat="server" GroupName="c" Text="固件Bug" Enabled="false"/>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="color: Blue">
                                            D:RestestOK
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton10" runat="server" GroupName="d" Text="RestestOK" Enabled="false"/>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="color: Blue">
                                            E:其它原因
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton11" runat="server" Text="其它原因" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton14" runat="server" Text="组装故障" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton15" runat="server" Text="焊接故障" Enabled="false"/>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton16" runat="server" Text="外观故障" Enabled="false"/>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel ID="TabPanel8" runat="server">
                            <HeaderTemplate>
                                维修报价
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table style="width: 100%; line-height: 25px">
                                    <tr>
                                        <td>
                                            <asp:GridView ID="WXLJGridView" runat="server" AutoGenerateColumns="False" Width="100%"
                                                CssClass="tableList" >
                                                <Columns>
                                                    <asp:BoundField HeaderText="零件名" DataField="AccessoryName">
                                                        <ItemStyle Width="30%" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="单价">
                                                        <EditItemTemplate>
                                                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("UnitPrice") %>'></asp:TextBox>
                                                        </EditItemTemplate>
                                                        <ItemTemplate>
                                                            <%# Math.Round(Convert.ToDecimal(Eval("UnitPrice")), 2)%>
                                                        </ItemTemplate>
                                                        <ItemStyle Width="20%" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="个数" DataField="Count">
                                                        <ItemStyle Width="15%" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="总价">
                                                        <EditItemTemplate>
                                                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Cost") %>'></asp:TextBox>
                                                        </EditItemTemplate>
                                                        <ItemTemplate>
                                                            <%# Math.Round(Convert.ToDecimal(Eval("Cost")), 2)%>
                                                        </ItemTemplate>
                                                        <ItemStyle Width="15%" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="是否保外备案" DataField="IsBWBA">
                                                        <ItemStyle Width="20%" />
                                                    </asp:BoundField>
                                                </Columns>
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                    <tr align="center">
                                        <td>
                                            <asp:Label ID="bjLabel" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel ID="TabPanel9" runat="server">
                            <HeaderTemplate>
                                维修备注
                            </HeaderTemplate>
                            <ContentTemplate>
                                <span style="color: Red">提示：请完整填写测试方法和测试过程记录，例如：通电5次、持续测试8小时等信息</span>
                                        <asp:TextBox ID="bzTextBox" runat="server" TextMode="MultiLine" Width="90%" Rows="5"
                                             ReadOnly="true"></asp:TextBox>
                            </ContentTemplate>
                        </cc1:TabPanel>
                    </cc1:TabContainer>
                </ContentTemplate>
            </asp:UpdatePanel>            
            <div align="center">
                <img src="image/operateicon/docdelete.gif" alt="" />
                <asp:LinkButton ID="LinkButton1" runat="server">关闭</asp:LinkButton>
            </div>
        </div>
        <div class="box-footer">
            <img alt="" src="image/stdBox_left_bottom.gif" />
            <p>
                &nbsp;</p>
        </div>
    </asp:Panel>
    <asp:Button runat="server" ID="hiddenTargetControlForModalPopup" Style="display: none" />
</asp:Content>
